package com.group.sliding.context;

public class AdminContext {
    private static final ThreadLocal<Boolean> THREAD_LOCAL = new ThreadLocal<>();

    public static void setAdmin(Boolean isAdmin) {
        THREAD_LOCAL.set(isAdmin);
    }

    public static Boolean isAdmin() {
        return THREAD_LOCAL.get();
    }

    public static void removeAdmin(){
        THREAD_LOCAL.remove();
    }
}
